package com.hopoke.common.expection;

import com.hopoke.common.domain.ResultCodeEnum;
import lombok.Getter;

@Getter
public class CommonException extends RuntimeException {
    private int code;

    public CommonException (String message, Throwable cause, ResultCodeEnum status) {
        super(message, cause);
        this.code = status.getCode();
    }

    public CommonException (String message, ResultCodeEnum status) {
        super(message);
        this.code = status.getCode();
    }

    public CommonException (Throwable cause, ResultCodeEnum status) {
        super(cause);
        this.code = status.getCode();
    }
}
